# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgname=python-reflink
pkgver=0.2.1
pkgrel=5
pkgdesc='Reflink support for Python'
arch=(loong64 x86_64)
url=https://gitlab.com/rubdos/pyreflink
license=(MIT)
depends=(python-cffi)
makedepends=(
  git
  python-pytest-runner
  python-setuptools
  python-wheel
)
_tag=48a3a3e6212e40eb44da47db9cbcb2e2c8306d50
source=(git+https://gitlab.com/rubdos/pyreflink.git#tag=${_tag})
b2sums=(SKIP)

pkgver() {
  cd pyreflink
  git describe --tags
}

build() {
  cd pyreflink
  python setup.py build
}

package() {
  cd pyreflink
  python setup.py install --root="${pkgdir}" --optimize=1
  install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/python-reflink/
}

# vim: ts=2 sw=2 et:
